package d10_extends_constructor;

public class Test3 {
    public static void main(String[] args) {
        Student s1 = new Student("hjf", "njust", 25);
    }
}

class Student{
    private String name;
    private String schoolName;
    private int age;

    public Student(String name, String schoolName, int age) {
        this.name = name;
        this.schoolName = schoolName;
        this.age = age;
    }

    public Student(String name, int age){
        this(name, "浙江大学", age);
    }

    public Student() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
